<include file="Public:header_content" />


        <div class="row">

                    <div class="ibox-content">
                        <form id='add-member-form' class="form-horizontal m-t" method="post" action="__SELF__" >
                            <div class="form-group">
                                <label class="col-sm-3 control-label">采集地址：</label>
                                <div class="col-sm-6">
                                    <input id="mobile" name="url" class="form-control" value="http://" type="text" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">类型：</label>
                                <div class="col-sm-2">
                                    <select name="type" class="form-control">
                                        <option value="update">跟新</option>
                                        <option value="add" selected>添加</option>
                                        <option value="end" >完结</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-5">
                                    <textarea name="remark" class="form-control" rows="6"></textarea>
                                </div>
                            </div>

                            <div class="form-group">
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                                        <button type="submit" class="btn btn-primary">保存</button>
                                    </div>

                            </div>
                        </form>

            </div>
        </div>


<include file="Public:footer_content" />
<script>
    $.validator.setDefaults({
	highlight:function(e){
		$(e).closest(".form-group").removeClass("has-success").addClass("has-error")},
		success:function(e){
			e.closest(".form-group").removeClass("has-error").addClass("has-success")
		},
		errorElement:"span",
		errorPlacement:function(e,r){
			e.appendTo(r.is(":radio")||r.is(":checkbox")?r.parent().parent().parent():r.parent())
		},
		errorClass:"help-block m-b-none",
		validClass:"help-block m-b-none"
	});

    $().ready(function() {
        var e="<i class='fa fa-times-circle'></i> ";
        $("#add-member-form").validate({
			rules:{
				name:{
                                    required:true,
                                    rangelength:[1,10],
//                                    remote: {
//                                        url: "<{:U('Public/checkRepeatMobile')}>",     //后台处理程序
//                                        type: "post",               //数据发送方式
//                                        dataType: "json",           //接受数据格式
//                                        data: {                     //要传递的数据
//                                            mobile:function(){
//                                                return $('#mobile').val();
//                                            }
//                                        }
//                                    }
                                },
				weight:{required:!0,digits:true,max:99,min:0},
				disabled:{required:!0,},
				contact:{},
				url:{required:!0,url:true}
			},
			messages:{
				name:{
                                    required:e+"请输入连接名称",
                                    rangelength:e+"必须两个字符以上1到10个字符之间"
                                },
				weight:{
					required:e+"请输入排序权重",
					digits:e+"排序权重只能是数字"
				},
				disabled:{
					required:e+"请选择状态"
				},
				contact:{
				},
				//email:e+"请输入您的E-mail",
				url:{
					required:e+"请输入URL链接地址",
					url:e+"输入的链接地址有误"
				}
			}
		});

    });
</script>